package cn.bigway.app.weavingdesigner.action;

import cn.bigway.app.weavingdesigner.swing.WdDialog;
import cn.bigway.app.weavingdesigner.type.WdMenuItemType;

public abstract class WdDialogAction<T extends WdDialog> extends WdAction {
	private static final long serialVersionUID = 4160692301940838426L;
	private T dlg;

	protected abstract T createDialog();

	public WdDialogAction(WdMenuItemType type) {
		super(type);
		this.dlg = createDialog();
	}

	@Override
	protected void actionWork() {
		this.dlg.showDialog();
	}

}
